<?php
Yii::import('zii.widgets.grid.CGridView');
class CatsRatingGrid extends CGridView {
    
    public $zeroPartners;
    
    public function renderTableBody() {





        $data = $this->dataProvider->getData();
        $n = count($data);
        echo "<tbody>\n";


        if (!empty($this->zeroPartners)) {
            foreach ($this->zeroPartners as $item) {
                echo(
                        '<tr style="background-color: #e4f082; padding: 10px;">
                            <td style="font-size:14px;background-color: #e4f082;border-bottom:none;"> 
                                <a href="'.Yii::app()->createUrl('partner/profile/index', array('catId'=>$item['catId'], 'partnerUrl'=>$item['url'])).'">' . $item['name'] . '</a> 
                            </td>
                            <td colspan=' . count($this->columns) . ' style="text-align:justify;font-size:12px;background-color: #e4f082;border-bottom:none;">' . CPartnerkiHelper::getShortText(strip_tags($item['about']), 230) . '</td>   
                         </tr>'
                );
            }
        }


        if ($n > 0) {
            for ($row = 0; $row < $n; ++$row)
                $this->renderTableRow($row);
        } else {
            echo '<tr><td colspan="' . count($this->columns) . '" class="empty">';
            $this->renderEmptyText();
            echo "</td></tr>\n";
        }
        echo "</tbody>\n";
    }
}


